package com.example.service;

import com.example.entity.Alert;
import com.example.mapper.AlertMapper;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class AlertService {
    private final AlertMapper alertMapper;

    public AlertService(AlertMapper alertMapper) {
        this.alertMapper = alertMapper;
    }

    public List<Alert> getAllAlerts() {
        return alertMapper.selectAll();
    }

    public List<Alert> getAlertsBySiteId(Integer siteId) {
        return alertMapper.selectBySiteId(siteId);
    }
} 